package org.despair2D.ui.puppet 
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	
	import org.despair2D.core.ns_despair;
	use namespace ns_despair;
	
	
public class ImagePuppetComp extends PuppetCompBase
{
	
	public function ImagePuppetComp( proxy:IPuppet ) 
	{
		super(proxy);
		
		m_img = new Bitmap()
		this.addChild(m_img);
	}
	

	
	final override public function set rotation( v:Number ) : void 
	{
		super.rotation = v;
		if (m_rotation != 0 && !m_transformDirty)
		{
			this.makeTransform();
		}
	}
	
	

	final override ns_despair function makeTransform() : void
	{
		m_transformDirty = this.m_img.smoothing = true;
	}
	

	override ns_despair function recycle() : void
	{
		super.recycle();
		
		m_img.bitmapData  =  null;
		m_transformDirty  =  false;
	}
	
	
	
	
	ns_despair var m_img:Bitmap;

	ns_despair var m_transformDirty:Boolean;
	
	
}

}